<?php
header("Content-Type:text/html; charset=utf-8");

require_once("../../connectMysql/connetMysql.class.php");
$db=new connetMysql;
$con=$db->getConnect();



$result = mysqli_query($con,"SELECT * FROM user where username='".$_POST["user_name"]."' OR usermail='".$_POST["user_name"]."'");

if($row = mysqli_fetch_array($result))
  {
	  if($row['userstate']==1){
		  echo "1";
	  }
	  else{
		   echo "2"; 
	  }
  }
else
  {
	  echo "3";   ////////昵称可用
  }

mysqli_close($con);
?>
